import Layout from '@/views/layout'

export default {
  path: '/finance',
  name: 'finance',
  component: Layout,
  redirect: '/finance/earnings',
  meta: {
    title: '财务管理',
    icon: 'nested',
    perm: 'm:finance',
    sort: 6
  },
  children: [
    {
      path: '/finance/widthdraw',
      name: 'financeWidthdraw',
      component: () => import('@/views/finance/widthdraw'),
      meta: {
        title: '应付列表',
        icon: 'table',
        perm: 'm:finance:widthdraw'
      }
    },
    {
      path: '/finance/refund',
      name: 'finance',
      component: () => import('@/views/common/index'),
      redirect: '/finance/refund/customer',
      meta: {
        title: '退款管理',
        icon: 'nested',
        perm: 'm:finance:refund'
      },
      children: [
        {
          path: '/finance/refund/customer',
          name: 'financeRefundCustomer',
          component: () => import('@/views/finance/refund/customer'),
          meta: {
            title: '客服审核退款',
            icon: 'table',
            perm: 'm:finance:refund:customer'
          }
        },
        {
          path: '/finance/refund/list',
          name: 'financeRefundList',
          component: () => import('@/views/finance/refund/list'),
          meta: {
            title: '财务审核退款',
            icon: 'table',
            perm: 'm:finance:refund:list'
          }
        }
      ]
    }
  ]
}
